package cn.gson.work.model.pojos;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Objects;

@Entity
public class Schedule {
    private long sId;
    private Long pId;
    private String sDu;
    private String sJy;

    @Id
    @Column(name = "S_ID")
    public long getsId() {
        return sId;
    }

    public void setsId(long sId) {
        this.sId = sId;
    }

    @Basic
    @Column(name = "P_ID")
    public Long getpId() {
        return pId;
    }

    public void setpId(Long pId) {
        this.pId = pId;
    }

    @Basic
    @Column(name = "S_DU")
    public String getsDu() {
        return sDu;
    }

    public void setsDu(String sDu) {
        this.sDu = sDu;
    }

    @Basic
    @Column(name = "S_JY")
    public String getsJy() {
        return sJy;
    }

    public void setsJy(String sJy) {
        this.sJy = sJy;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Schedule schedule = (Schedule) o;
        return sId == schedule.sId &&
                Objects.equals(pId, schedule.pId) &&
                Objects.equals(sDu, schedule.sDu) &&
                Objects.equals(sJy, schedule.sJy);
    }

    @Override
    public int hashCode() {
        return Objects.hash(sId, pId, sDu, sJy);
    }
}
